<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Hello</title>
</head>
<body>
欢迎您，<span th:text="${user.name1} + '在捉老虎'">usrName</span>！
<span th:text="|性别是 ${user.gender}|"></span>
年纪为<span>[[${user.age}]]</span>
<div th:object="${user}">
    <span th:text="*{name1}"></span>
</div>
现在时间为：<span th:text="${#dates.format(date,'yyyy-MM-dd HH:mm:ss')}"></span>
<a th:href="@{http://www.baidu.com}">百度</a>
<a th:href="@{/add}">新增</a>
<a th:href="@{/update(id=1)}">修改</a>

<p th:if="${user.name1 =='苹果'}">王梓的最爱 </p>
<p th:unless="${user.name1 =='张三'}">阿彪的最爱 </p>

<ul th:each="user:${users}">
    <li th:text="${user.sid}">1</li>
    <li th:text="${user.name1}">1</li>
    <li th:text="${user.gender}">1</li>
    <li th:text="${user.age}">1</li>
</ul>

<script th:inline="javascript">
    var msg = 'Hello ' + [[${user.name1}]] + '！你在干啥！';
    alert(msg);
</script>
</body>
</html>